<?php echo $this->fetch('header.html'); ?>
<div id="rightTop">
  <p>管理员管理</p>
  <ul class="subnav">
    <li><span>管理</span></li>
    <li><a class="btn1" href="index.php?app=admin&amp;act=add">添加</a></li>
  </ul>
</div>

<div class="mrightTop">
  <div class="fontl">
    <form method="get">
       <div class="left">
          <input type="hidden" name="app" value="admin" />
          <select class="querySelect" name="field_name"><?php echo $this->html_options(array('options'=>$this->_var['query_fields'],'selected'=>$_GET['field_name'])); ?>
          </select>
          <input class="queryInput" type="text" name="field_value" value="<?php echo htmlspecialchars($_GET['field_value']); ?>" />
          排序:
          <select class="querySelect" name="sort"><?php echo $this->html_options(array('options'=>$this->_var['sort_options'],'selected'=>$_GET['sort'])); ?>
          </select>
          <select name="pagenum">
            <option value="20" <?php if ($this->_var['pagenum'] == 20): ?>selected<?php endif; ?>>每页20条</option>
            <option value="50" <?php if ($this->_var['pagenum'] == 50): ?>selected<?php endif; ?>>每页50条</option>
            <option value="100" <?php if ($this->_var['pagenum'] == 100): ?>selected<?php endif; ?>>每页100条</option>
            <option value="150" <?php if ($this->_var['pagenum'] == 150): ?>selected<?php endif; ?>>每页150条</option>
            <option value="200" <?php if ($this->_var['pagenum'] == 200): ?>selected<?php endif; ?>>每页200条</option>
          </select>
          <input type="submit" class="formbtn" value="查询" />
      </div>
      <?php if ($this->_var['filtered']): ?>
      <a class="left formbtn1" href="index.php?app=user">撤销检索</a>
      <?php endif; ?>
    </form>
  </div>
  <div class="fontr"><?php echo $this->fetch('page.top.html'); ?></div>
</div>
<div class="tdare">
  <form method=get>
  <table width="100%" cellspacing="0" class="dataTable">
    <?php if ($this->_var['admins']): ?>
    <tr class="tatr1">
      <td width="20" ><input type="checkbox" class="checkall" /></td>
      <td>用户名 | 真实姓名</td>
      <td><span ectype="order_by" fieldname="email">电子邮件</span></td>
      <td><span ectype="order_by" fieldname="im">即时通讯</span></td>
      <td><span ectype="order_by" fieldname="last_login">上次登录/IP</span></td>
      <td><span ectype="order_by" fieldname="logins">登录次数</span></td>
      <td class="handler">操作</td>
    </tr>
    <?php endif; ?>
    <?php $_from = $this->_var['admins']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'admin');if (count($_from)):
    foreach ($_from AS $this->_var['admin']):
?>
    <tr class="tatr2">
      <td class="firstCell"><input type="checkbox" class="checkitem" value="<?php echo $this->_var['admin']['user_id']; ?>" /></td>
      <td><a href="index.php?app=user&act=edit&id=<?php echo $this->_var['admin']['user_id']; ?>"><?php echo htmlspecialchars($this->_var['admin']['user_name']); ?></a> | <?php echo htmlspecialchars($this->_var['admin']['real_name']); ?></td>
      <td><a href="mailto:<?php echo htmlspecialchars($this->_var['admin']['email']); ?>"><?php echo htmlspecialchars($this->_var['admin']['email']); ?></a></td>
      <td style="font-size:11px">
        <?php if ($this->_var['admin']['phone_mob']): ?>手机: <?php echo htmlspecialchars($this->_var['admin']['phone_mob']); ?><br /><?php endif; ?>
        <?php if ($this->_var['admin']['phone_tel']): ?>电话: <?php echo htmlspecialchars($this->_var['admin']['phone_tel']); ?><br /><?php endif; ?>
        <?php if ($this->_var['admin']['im_qq']): ?>QQ: <?php echo htmlspecialchars($this->_var['admin']['im_qq']); ?><br />
        <?php endif; ?>
        </td>
      <td style="font-size:10px"><?php if ($this->_var['admin']['last_login']): ?><?php echo local_date("Y-m-d H:i:s",$this->_var['admin']['last_login']); ?><?php endif; ?>&nbsp;&nbsp;(IP:<?php echo $this->_var['admin']['last_ip']; ?>)</td>
      <td><?php echo $this->_var['admin']['logins']; ?></td>
      <td width="25%">
      <?php if ($this->_var['admin']['privs'] == all): ?>系统管理员
      </td>
      <?php else: ?>
      <span><a href="index.php?app=admin&amp;act=edit&amp;id=<?php echo $this->_var['admin']['user_id']; ?>">管理员权限</a></span>
      </td>
      <?php endif; ?>
    </tr>
    <?php endforeach; else: ?>
    <tr class="no_data">
      <td colspan="10">没有符合条件的记录</td>
    </tr>
    <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
  </table>
  </form>
  <?php if ($this->_var['admins']): ?>
  <div id="dataFuncs">
    <div id="batchAction" class="left paddingT15"> &nbsp;&nbsp;
      <input class="formbtn batchButton" type="button" value="删除" name="id" uri="index.php?app=admin&act=drop" presubmit="confirm('你确定要删除它吗？该操作不会删除ucenter及其他整合应用中的用户');" />
    </div>
    <div class="pageLinks"><?php echo $this->fetch('page.bottom.html'); ?></div>
    <div class="clear"></div>
  </div>
  <?php endif; ?>
</div>
<?php echo $this->fetch('footer.html'); ?> 